MultipartInputStream

Constructors

this
this(SoupMultipartInputStream* soupMultipartInputStream, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(Message msg, InputStream baseStream)

Creates a new #SoupMultipartInputStream that wraps the #GInputStream obtained by sending the #SoupRequest. Reads should not be done directly through this object, use the input streams returned by soup_multipart_input_stream_next_part() or its async counterpart instead.

Members

Functions

getHeaders
MessageHeaders getHeaders()

Obtains the headers for the part currently being processed. Note that the #SoupMessageHeaders that are returned are owned by the #SoupMultipartInputStream and will be replaced when a call is made to soup_multipart_input_stream_next_part() or its async counterpart, so if keeping the headers is required, a copy must be made.

getMultipartInputStreamStruct
SoupMultipartInputStream* getMultipartInputStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

nextPart
InputStream nextPart(Cancellable cancellable)

Obtains an input stream for the next part. When dealing with a multipart response the input stream needs to be wrapped in a #SoupMultipartInputStream and this function or its async counterpart need to be called to obtain the first part for reading.

nextPartAsync
void nextPartAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* data)

Obtains a #GInputStream for the next request. See soup_multipart_input_stream_next_part() for details on the workflow.

nextPartFinish
InputStream nextPartFinish(AsyncResultIF result)

Finishes an asynchronous request for the next part.

Mixins

__anonymous
mixin PollableInputStreamT!(SoupMultipartInputStream)
Undocumented in source.

Static functions

getType
GType getType()

Variables

soupMultipartInputStream
SoupMultipartInputStream* soupMultipartInputStream;

the main Gtk struct

Mixed In Members

From mixin PollableInputStreamT!(SoupMultipartInputStream)

getPollableInputStreamStruct
GPollableInputStream* getPollableInputStreamStruct(bool transferOwnership)

Get the main Gtk struct

canPoll
bool canPoll()

Checks if @stream is actually pollable. Some classes may implement #GPollableInputStream but have only certain instances of that class be pollable. If this method returns %FALSE, then the behavior of other #GPollableInputStream methods is undefined.

createSource
Source createSource(Cancellable cancellable)

Creates a #GSource that triggers when @stream can be read, or @cancellable is triggered or an error occurs. The callback on the source is of the #GPollableSourceFunc type.

isReadable
bool isReadable()

Checks if @stream can be read.

readNonblocking
ptrdiff_t readNonblocking(ubyte[] buffer, Cancellable cancellable)

Attempts to read up to @count bytes from @stream into @buffer, as with g_input_stream_read(). If @stream is not currently readable, this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can use g_pollable_input_stream_create_source() to create a #GSource that will be triggered when @stream is readable.

Inherited Members

From FilterInputStream

gFilterInputStream
GFilterInputStream* gFilterInputStream;

the main Gtk struct

getFilterInputStreamStruct
GFilterInputStream* getFilterInputStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getBaseStream
InputStream getBaseStream()

Gets the base stream for the filter stream.

getCloseBaseStream
bool getCloseBaseStream()

Returns whether the base stream will be closed when @stream is closed.

setCloseBaseStream
void setCloseBaseStream(bool closeBase)

Sets whether the base stream will be closed when @stream is closed.

From PollableInputStreamIF

getPollableInputStreamStruct
GPollableInputStream* getPollableInputStreamStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
canPoll
bool canPoll()

Checks if @stream is actually pollable. Some classes may implement #GPollableInputStream but have only certain instances of that class be pollable. If this method returns %FALSE, then the behavior of other #GPollableInputStream methods is undefined.

createSource
Source createSource(Cancellable cancellable)

Creates a #GSource that triggers when @stream can be read, or @cancellable is triggered or an error occurs. The callback on the source is of the #GPollableSourceFunc type.

isReadable
bool isReadable()

Checks if @stream can be read.

readNonblocking
ptrdiff_t readNonblocking(ubyte[] buffer, Cancellable cancellable)

Attempts to read up to @count bytes from @stream into @buffer, as with g_input_stream_read(). If @stream is not currently readable, this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can use g_pollable_input_stream_create_source() to create a #GSource that will be triggered when @stream is readable.

Meta